package com.yfp.common.core.constant;

/**
 * 缓存常量信息
 *
 *
 */
public class CacheConstants {
    /**
     * 缓存有效期，默认10080（分钟） 7天
     */
    public static final long EXPIRATION = 10080;

    /**
     * 缓存刷新时间，默认120（分钟）
     */
    public static final long REFRESH_TIME = 120;

    /**
     * 密码最大错误次数
     */
    public static final int PASSWORD_MAX_RETRY_COUNT = 5;

    /**
     * 密码锁定时间，默认10（分钟）
     */
    public static final long PASSWORD_LOCK_TIME = 10;
    /**
     * 密码锁定时间，默认60s
     */
    public static final long SMS_VERIFICATION_TIME = 60;

    /**
     * 密码锁定时间，默认30分钟
     */
    public static final long TIME_INTERVAL_MINUTES = 10;

    /**
     * 密码锁定时间，默认5s
     */
    public static final long TIME_KEY_SECOND = 5;

    /**
     * 短信验证码有效时间
     */
    public final static long SMS_CAPTCHA_TIME = 5;

    /**
     * 权限缓存前缀
     */
    public static final String LOGIN_TOKEN_KEY = "yfp:login_tokens:";
    /**
     * 短信次数限制key
     */
    public static final String SEND_LIMIT_KEY = "yfp:send_limit:";

    /**
     * 最大短信计数
     */
    public static final Integer MAX_SMS_COUNT = 5;

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "yfp:captcha_codes:";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "yfp:sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "yfp:sys_dict:";

    /**
     * 登录账户密码错误次数 redis key
     */
    public static final String PWD_ERR_CNT_KEY = "yfp:pwd_err_cnt:";

    /**
     * 登录IP黑名单 cache key
     */
    public static final String SYS_LOGIN_BLACKIPLIST = SYS_CONFIG_KEY + "sys.login.blackIPList";
    /**
     * 设备 坐标缓存 key
     */
    public static final String GEO_MACHINE_KEY = "yfp:geo:machine:";

    /**
     * 作为存储经纬度列表的key值
     */
    public static final String GEO_KEY = "DISTANCE";
    public static final String MACHINE_READ_WRITE_KEY = "yfp:readWrit:machine:";

    /**
     * 短信登录验证码 redis key
     */
    public static final String SMS_LOGIN_CAPTCHA_CODE_KEY = "sms_captcha_codes:";

    /**
     * 短信重置密码验证码 redis key
     */
    public static final String SMS_RESET_CAPTCHA_CODE_KEY = "sms_captcha_codes:";

    /**
     * 短信登录验证码类型
     */
    public static final Integer SMS_LOGIN_CAPTCHA_TYPE = 1;

    /**
     * 短信重置密码验证码类型
     */
    public static final Integer SMS_RESET_CAPTCHA_TYPE = 2;

    /**
     * 延时队列，订单异常状态判断
     */
    public static final String DELAY_QUEUE_WORK_ORDER_CODE_KEY = "delay_queue:work_order:";

    /**
     * 延时队列，订单异常状态判断
     */
    public static final String DELAY_QUEUE_ORDER_DETAIL_CODE_KEY = "delay_queue:order_detail:";


    public static String MACHINE_ORDER_DETAIL_STATUS_LIST = "machine:order:order_detail";

    /**
     * 小程序订单创建锁
     */
    public static String MINAPP_ORDER_CREATE_LOCK_KEY = "yfp:minapp:order:create:lock:";

    /**
     * 小程序礼包订单创建锁
     */
    public static String MINAPP_ORDER_PACK_CREATE_LOCK_KEY = "yfp:minapp:order:pack:create:lock:";

    /**
     * 小程序商城订单创建锁
     */
    public static String MINAPP_ORDER_MALLPRODUCT_CREATE_LOCK_KEY = "yfp:minapp:order:mallProduct:create:lock:";

    /**
     * 小程序订单重复创建
     */
    public static String MINAPP_ORDER_CREATE_REPEAT_KEY = "yfp:minapp:order:create:repeat:";

    /**
     * 小程序订单，创建微信预支付单
     */
    public static String MINAPP_ORDER_CREATE_WX_PAY_PARTNER_JSAPI_KEY = "yfp:minapp:order:create:wx:pay:partner:jsapi:";

    /**
     * 小程序订单，创建订单延迟队列
     */
    public static String MINAPP_ORDER_CREATE_DELAY_QUEUE_KEY = "yfp:minapp:order:create:delay:queue:";

    /**
     * 小程序礼包订单，创建订单延迟队列
     */
    public static String MINAPP_ORDER_PACK_CREATE_DELAY_QUEUE_KEY = "yfp:minapp:order:pack:create:delay:queue:";
    /**
     * 小程序商城订单，创建订单延迟队列
     */
    public static String MINAPP_ORDER_MALLPRODUCT_CREATE_DELAY_QUEUE_KEY = "yfp:minapp:order:mallproduct:create:delay:queue:";
    /**
     * 物流信息缓存key
     */
    public static String MINAPP_ORDER_LOGISTICS_INFO_KEY = "yfp:minapp:order:logistics:info:";
    /**
     * 小程序订单核销码
     */
    public static String MINAPP_ORDER_TAKE_QR_CODE_KEY = "yfp:minapp:order:take:qr:code";

    /**
     * 优惠券剩余数量锁
     */
    public static String MAR_COUPON_SURPLUSCOUNT_LOCK_KEY = "yfp:mar:coupon:surplus_count:lock:key:";

    /**
     * 客户积分锁
     */
    public static String CLIENT_INTEGRAL_LOCK_KEY = "yfp:client:integral:lock:key:";

    /**
     * 抽奖奖品库存锁
     */
    public static String LOTTERY_PRIZE_REMAINING_STOCK_LOCK_KEY = "yfp:lottery:prize:remaining_stock:lock:key:";

    /**
     * 打卡奖品库存锁
     */
    public static String ACTIVITY_SIGN_INS_PRIZE_REMAINING_STOCK_LOCK_KEY = "yfp:activitySignIns:prize:remaining_stock:lock:key:";

    /**
     * 储值退款锁
     */
    public static String CLIENT_STORED_REFUND_NOTIFY_LOCK_KEY = "yfp:client:stored_refund_notify:lock:key:";

    /**
     * 优惠券礼包销售
     */
    public static String MAR_COUPON_PACKSHOP_LOCK_KEY = "yfp:mar:coupon:pack:shop:lock:key:";

    /**
     * 插入定向发放列表锁
     */
    public static String MAR_COUPON_DIRECTIONAL_LOCK_KEY = "yfp:mar:coupon:directional:lock:key:";

    /**
     * 优惠券礼包售量锁
     */
    public static String MAR_COUPON_PACK_SOLD_QUANTITY_LOCK_KEY = "yfp:mar:coupon:pack:sold_quantity:lock:key:";

    /**
     * 小程序领券中心-上新图标
     */
    public static String MINAPP_COUPON_NEW_ICON_KEY = "yfp:minapp:coupon:new:icon:";

    /**
     * 企业团餐券码id
     */
    public static String ENTERPRISE_CAPITAL_CPN = "yfp:enterprise:capital:cpn:";

    /**
     * 企业支出编号
     */
    public static String ENTERPRISE_CAPITAL_EXP = "yfp:enterprise:capital:exp:";

    /**
     * 企业团餐订单id
     */
    public static String ENTERPRISE_CAPITAL_ORD = "yfp:enterprise:capital:ord:";

    /**
     * 企业团餐充值单id
     */
    public static String ENTERPRISE_CAPITAL_CRG = "yfp:enterprise:capital:crg:";

    /**
     * 企业团餐，套餐购买创建订单延迟队列
     */
    public static String ENTERPRISE_ORDER_CREATE_DELAY_QUEUE_KEY = "yfp:enterprise:order:create:delay:queue:";

    /**
     * 企业余额充值订单锁
     */
    public static String ENTERPRISE_CAPITAL_ORDER_LOCK_KEY = "yfp:enterprise:capital:order:lock:key:";

    /**
     * 客服代取订单锁
     */
    public static String OPERATION_PICKUP_ORDER_LOCK_KEY = "yfp:operation:pickup:order:lock:key:";

    /**
     * 小程序订单状态，通知
     */
    public static String MINAPP_ORDER_STATUS_NOTIFYCOOKINGSTATUS_KEY = "yfp:minapp:order:status:notifyCookingStatus:";
}
